/***************************************************
> Copyright (C) 2024 ==KINGYI== All rights reserved.
> File Name: nwk8.6.c
> Author:
> Mail: 
> Created Time: Tue 06 Aug 2024 02:32:13 AM PDT
***************************************************/

//设计一个求正切值的函数

#include <math.h>
#include <string.h>
#include <stdio.h>


typedef double (*fun) (double);

double funtang(fun f1,fun f2,double arg)
{

	double res = 0;
	res = f1(arg)/f2(arg);
	return res;
}



int main(int argc,const char* argv[])
{
	double arg = 0;
	printf("please input arg的值:\n ");
	scanf("%lf",&arg);
	double ret=funtang(sin,cos,arg);
	printf("ret = %lf\n",ret);
		return 0;

}


